home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / BattMem.mod < prev    next >
Text File  |  1995-06-29  |  5KB  |  215 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: BattMem.mod $
  4.   Description: Interface to battmem.resource
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *>
  23.  
  24. MODULE [2] BattMem;
  25.  
  26. IMPORT SYS := SYSTEM, e := Exec;
  27.  
  28.  
  29. (*
  30. **      $VER: battmem.h 36.4 (1.5.90)
  31. **
  32. **      BattMem resource name strings.
  33. *)
  34.  
  35. CONST
  36.  
  37.   battMemName * = "battmem.resource";
  38.  
  39.  
  40. (*
  41. **      $VER: battmembitsamiga.h 39.3 (14.9.92)
  42. **
  43. **      BattMem Amiga specific bit definitions.
  44. *)
  45.  
  46.  
  47. (*
  48.  * Amiga specific bits in the battery-backedup ram.
  49.  *
  50.  *      Bits 0 to 31, inclusive
  51.  *)
  52.  
  53. (*
  54.  * AmigaAmnesia
  55.  *
  56.  *              The battery-backedup memory has had a memory loss.
  57.  *              This bit is used as a flag that the user should be
  58.  *              notified that all battery-backed bit have been
  59.  *              reset and that some attention is required. Zero
  60.  *              indicates that a memory loss has occured.
  61.  *)
  62.  
  63.   amigaAmnesiaAddr      * = 0;
  64.   amigaAmnesiaLen       * = 1;
  65.  
  66.  
  67. (*
  68.  * scsiTimeout
  69.  *
  70.  *              adjusts the timeout value for SCSI device selection.  A
  71.  *              value of 0 will produce short timeouts (128 ms) while a
  72.  *              value of 1 produces long timeouts (2 sec).  This is used
  73.  *              for SeaCrate drives (and some Maxtors apparently) that
  74.  *              don`t respond to selection until they are fully spun up
  75.  *              and intialised.
  76.  *)
  77.  
  78.   scsiTimeoutAddr       * = 1;
  79.   scsiTimeoutLen        * = 1;
  80.  
  81.  
  82. (*
  83.  * scsiLuns
  84.  *
  85.  *              Determines if the controller attempts to access logical
  86.  *              units above 0 at any given SCSI address.  This prevents
  87.  *              problems with drives that respond to ALL LUN addresses
  88.  *              (instead of only 0 like they should).  Default value is
  89.  *              0 meaning don't support LUNs.
  90.  *)
  91.  
  92.   scsiLunsAddr          * = 2;
  93.   scsiLunsLen           * = 1;
  94.  
  95.  
  96. (*
  97. **      $VER: battmembitsamix.h 1.1 (25.5.90)
  98. **
  99. **      BattMem Amix specific bit definitions.
  100. *)
  101.  
  102.  
  103. (*
  104.  *      See Amix documentation for these bit definitions
  105.  *
  106.  *      Bits 32 to 63, inclusive
  107.  *)
  108.  
  109. (*
  110. **      $VER: battmembitsshared.h 39.2 (4.6.93)
  111. **
  112. **      BattMem shared specific bit definitions.
  113. *)
  114.  
  115.  
  116. (*
  117.  * Shared bits in the battery-backedup ram.
  118.  *
  119.  *      Bits 64 and above
  120.  *)
  121.  
  122. (*
  123.  * sharedAmnesia
  124.  *
  125.  *              The battery-backedup memory has had a memory loss.
  126.  *              This bit is used as a flag that the user should be
  127.  *              notified that all battery-backed bit have been
  128.  *              reset and that some attention is required. Zero
  129.  *              indicates that a memory loss has occured.
  130.  *)
  131.  
  132.   sharedAmnesiaAddr     * = 64;
  133.   sharedAmnesiaLen      * = 1;
  134.  
  135.  
  136. (*
  137.  * scsiHostID
  138.  *
  139.  *              a 3 bit field (0-7) that is stored in complemented form
  140.  *              (this is so that default value of 0 really means 7)
  141.  *              It's used to set the A3000 controllers SCSI ID (on reset)
  142.  *)
  143.  
  144.   scsiHostIdAddr       * = 65;
  145.   scsiHostIdLen        * = 3;
  146.  
  147.  
  148. (*
  149.  * scsiSyncXfer
  150.  *
  151.  *              determines if the driver should initiate synchronous
  152.  *              transfer requests or leave it to the drive to send the
  153.  *              first request.  This supports drives that crash or
  154.  *              otherwise get confused when presented with a sync xfer
  155.  *              message.  Default=0=sync xfer not initiated.
  156.  *)
  157.  
  158.   scsiSyncXferAddr     * = 68;
  159.   scsiSyncXferLen      * = 1;
  160.  
  161. (*
  162.  * scsiFastSync
  163.  *
  164.  *              determines if the driver should initiate fast synchronous
  165.  *              transfer requests (>5MB/s) instead of older <=5MB/s requests.
  166.  *              Note that this has no effect if synchronous transfers are not
  167.  *              negotiated by either side.
  168.  *              Default=0=fast sync xfer used.
  169.  *)
  170.  
  171.   scsiFastSyncAddr * = 69;
  172.   scsiFastSyncLen * = 1;
  173.  
  174. (*
  175.  * scsiTagQueues
  176.  *
  177.  *              determines if the driver should use SCSI-2 tagged queuing
  178.  *              which allows the drive to accept and reorder multiple read
  179.  *              and write requests.
  180.  *              Default=0=tagged queuing NOT enabled
  181.  *)
  182.  
  183.   scsiTagQueuesAddr * = 70;
  184.   scsiTagQueuesLen * = 1;
  185.  
  186.  
  187. (**-- Resource Base variable --------------------------------------------*)
  188.  
  189. VAR
  190.  
  191.   base * : e.APTR;
  192.  
  193.  
  194. (**-- Resource Functions ------------------------------------------------*)
  195.  
  196. (*
  197. **      $VER: battmem_protos.h 1.5 (4.3.91)
  198. *)
  199.  
  200. PROCEDURE ObtainBattSemaphore* [base,-6] ();
  201. PROCEDURE ReleaseBattSemaphore* [base,-12] ();
  202. PROCEDURE ReadBattMem* [base,-18]
  203.   ( VAR buffer [8] : ARRAY OF SYS.BYTE;
  204.     offset     [0] : e.ULONG;
  205.     length     [1] : e.ULONG )
  206.   : e.ULONG;
  207. PROCEDURE WriteBattMem* [base,-24]
  208.   ( buffer [8] : ARRAY OF SYS.BYTE;
  209.     offset [0] : e.ULONG;
  210.     length [1] : e.ULONG )
  211.   : e.ULONG;
  212.  
  213. BEGIN base := NIL
  214. END BattMem.
  215.